<?php
global $_GPC, $_W;
$mid = $_GPC['mid'];
$pagesize = 20;
$pageindex = max(1, intval($_GPC['page']));
$limit = "limit " . (($pageindex -1) * $pagesize).','. $pagesize;
$list = getall('select credit,remark,createtime from ' .tb('mcredit'). " where mid='{$mid}' order by createtime desc {$limit}");
if(!empty($list)){
	foreach ($list as $k => $v){
		$list[$k]['createtime'] = date('Y-m-d H:i',$v['createtime']);
	}
}
if($_GPC['scroll']){
	if(!empty($list)){
		$data = array(
				'status' => '1',
				'lists' => $list,
		);
	}else{
		$data = array('status'=>'0');
	}
	die(json_encode($data));
}